#!/usr/bin/perl
use strict;
use warnings;

use Test::More;

unless ($ENV{'AMAZON_S3_EXPENSIVE_TESTS'}) {
    plan skip_all => 'Testing this module for real costs money.';
} else {
    plan tests => 7;
}

use_ok('Amazon::Bezos');

my $bezos = Amazon::Bezos->new;
my $acct = $bezos->account;

ok($acct);
ok(ref $acct eq 'Amazon::Bezos::Account');
ok($acct->access_key_id eq $ENV{'AWS_ACCESS_KEY_ID'});
ok($acct->secret_access_key eq $ENV{'AWS_ACCESS_KEY_SECRET'});

my $s3 = $bezos->s3;
my $sqs = $bezos->sqs;
my $ec2 = $bezos->ec2;

ok($s3  && ref $s3  eq 'Amazon::S3');
# ok($sqs && ref $sqs eq 'Amazon::SQS::Simple'); # this causes tests to die because of overloaded "" operator method is flawed.
ok($ec2 && ref $ec2 eq 'Net::Amazon::EC2');
